package cn.uyunsky.platform.data;

import java.util.Map;

/**
 * <p>Description:通用服务请求头
 * service,fncode 两项唯一确定一组请求响应。即一组服务数据接口
 * </p>
 *
 * @version 1.0
 * @date 2012-1-19
 */
public class UHead {

    /*============请求部分==========*/
    private String seqno;//流水号;唯一标示一次服务请求
    private String userid;// 用户id
    private String service;// 服务码
    private Map<String, Object> contextData;//上下文数据,从请求到结束保持一致

    /*============响应部分==========*/
    private boolean success;
    private String errorcode;
    private String msg;

    public String getSeqno() {
        return seqno;
    }

    public void setSeqno(String seqno) {
        this.seqno = seqno;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }


    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getErrorcode() {
        return errorcode;
    }

    public void setErrorcode(String errorcode) {
        this.errorcode = errorcode;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Map<String, Object> getContextData() {
        return contextData;
    }

    public void setContextData(Map<String, Object> contextData) {
        this.contextData = contextData;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("UHead{");
        sb.append("seqno='").append(seqno).append('\'');
        sb.append(", userid='").append(userid).append('\'');
        sb.append(", service='").append(service).append('\'');
        sb.append(", success=").append(success);
        sb.append(", errorcode='").append(errorcode).append('\'');
        sb.append(", msg='").append(msg).append('\'');
        sb.append(", contextData=").append(contextData);
        sb.append('}');
        return sb.toString();
    }
}
